<template>

   <input type="text" v-model="input"> 父组件传递的数据： {{ username }}
</template>


<script lang='ts' setup name='MyInput'>
import { ref } from 'vue'
const input = ref('')


let prpos = defineProps(["username"])

//从属性中获取值
const username = prpos.username

console.log("username定义变量",username)






</script>



<style scoped>
    input{
        outline: none;
        border: none  ;
        border-bottom: solid 1px black ;
        background-color: rgb(222, 233, 233);
    }
    

</style>